package CelestialDataStructures;

import java.util.Collection;
import java.util.Iterator;

public class ActiveFilterIterator<T extends IActive> implements Iterator{

    public final int ACTIVE_ONLY = 0;
    public final int INACTIVE_ONLY = 1;
    
    Iterator<T> it;
    T current;

    ActiveFilterIterator(Collection<T> c, boolean iterate_mode){
        it = c.iterator();
    }

    public void remove(){}
    /*-----------------------------------------------------------------------*/
    public T next(){
        return current;
    }
    /*-----------------------------------------------------------------------*/
    public boolean hasNext(){
        T next;
        while(it.hasNext()){
            next = it.next();
            if(next.isActive()){
                current = next;
                return true;
            }
        }
        return false;
    }
    /*-----------------------------------------------------------------------*/
}
